Apparatus and method for obtaining a string representation of objects in displayed hierarchical structures

ABSTRACT

An apparatus and method for obtaining a string representation of objects in a displayed hierarchical structure are provided. With the apparatus and method, a list having separators may be converted into a path equivalent for a specified hierarchical structure. In order to convert the separated list into a textual representation for an object in a hierarchical structure, an input string having separators is received and the cell renderer for a hierarchical structure is identified. Comparisons between portions of the separated list are compared to string representations for objects in the hierarchical structure in order to identify matches and ultimately, a path in the hierarchical structure corresponding to the separated list. The string representations for the objects are obtained by identifying the cell renderer component that is used to paint the object on a display and determining if the cell renderer component has predetermined methods used to obtain text for display. If so, these methods are used to obtain the string. Otherwise, if there are no predetermined methods, a check is made as to whether the object is a container and, if so, the objects within the container are checked for ones in which methods for painting text are found.

BACKGROUND OF THE INVENTION

[0001] 1. Technical Field

[0002] The present invention is generally directed to an improved computing system. More specifically, the present invention is directed to an apparatus and method for obtaining string representations of nodes in displayed hierarchical structures.

[0003] 2. Description of Related Art

[0004] To ensure that applications perform and operate as expected, they need to be tested prior to release. Such testing involves the adoption of a test management strategy followed by the performance of load testing and functional testing on the applications. Load testing involves the emulation of multiple users interacting with an application infrastructure to ascertain where any bottlenecks may exist. Functional testing involves automatically capturing, verifying and replaying user interactions to determine if the applications function as expected.

[0005] A known mechanism for performing functional tests on applications is the WinRunner program available from Mercury Interactive. With the WinRunner program, test scripts are generated by recording a user's interaction with a particular version of an application's graphical user interface (GUI). The recording is then later replayed to test the application, or other versions of the application, with different data sets. Reports are generated indicating the events occurring during the test and any errors that may occur.

[0006] A problem with GUI test harnesses, such as WinRunner, is the representation of nodes of hierarchical structures, such as tree and list structures, in such a way that a user may specify an appropriate string in a test script for selecting the node that they see on the screen. This is a significant problem because the tree nodes and list items may be arbitrary objects, making it extremely difficult to convert what the user sees on the screen to a string representation that they can use to specify which tree node or list item they wish to select.

[0007] Typically, in order to obtain a string representation of the node in a tree or list structure in an object oriented environment, such as a Java JTree or JList a call to the method toString() on the node itself is used. However, with complex objects, i.e. objects whose toString() does not return what is seen on the screen such as a container object which contains an image object and a text label object, the string returned by this method does not bear any resemblance to the object depicted in the tree or list structure. As a result, if the user were to try and correlate the string returned by toString() with the tree or list at a later time, it would be very difficult to identify which node in the tree or list corresponds to this string.

[0008] For example, assume that there is a tree structure having the following organization: Hostname Directory 1 Directory 2 SubDirectory 1

[0009] When generating a test script for a testing harness by recording the user's interaction with the GUI, when the user selects the SubDirectory 1 from the tree structure, it is necessary to convert the displayed object, i.e. node, into a string representation of the object. Using known mechanisms to obtain this string representation, e.g., using the toString() method call on the SubDirectory 1 node, a string representation is returned that bears no likeness to the tree structure shown above. For example, a string such as the following may be returned:

[0010] Hostname: implicit method call getHost|_Directory: level 2 implicit Call 5_Directory:Level 2 implicit Call 5

[0011] where the symbol “|_” is a separator that indicates traversing down into the tree structure. It is clear from the above, that if a user, at a later time, attempts to resolve this string to a displayed node in the tree structure, it would be very difficult for that user to identify which node in the tree structure corresponds to the string.

[0012] Thus, it would be beneficial to have an apparatus and method that is capable of automatically identifying a selected tree or list object with a string representation that resembles the displayed node in its tree or list structure.

SUMMARY OF THE INVENTION

[0013] The present invention provides an apparatus and method for obtaining a string representation of objects in a displayed hierarchical structure. This string representation may then be used to reference the object at a later time, e.g., in test scripts and the like.

[0014] With the apparatus and method of the present invention, a list having separators, such as “|_” or “/”, may be converted into a path equivalent, such as a TreePath, for a specified hierarchical structure, such as a JTree. The path may then be used to reference objects in a display of the hierarchical structure. The path may also be used to render the objects in the hierarchical structure.

[0015] In order to convert the separated list into a textual representation for an object in a hierarchical structure, an input string having separators is received and the cell renderer for a hierarchical structure is identified. The first string portion of the input string (portions being delimited by the separators), is identified and a search of the hierarchical structure is performed to find an object in the hierarchical structure matching the first string portion.

[0016] The search of the hierarchical structure involves taking an object, or node, at a row, i.e. level of the hierarchical structure, obtaining a text representation for the object, and comparing the text representation for the object to the input string portion. If there is not a match, the next object, or node, in the hierarchical structure is checked and so on until the end of the hierarchical structure is encountered. If the end of the hierarchical structure is encountered and there are still portions of the input string for which a matching node in the hierarchical structure is not found, then the present invention terminates with a failure indication.

[0017] If the text representation for the object matches the input string portion, the next input string portion is checked against a text representation for the next node in the hierarchical structure. This process continues until either the end of the hierarchical structure is encountered or there are no more input string portions to process. If there are no more input string portions to process, then the hierarchical structure path identified by the matching is output.

[0018] The present invention obtains the textual representation for a hierarchical structure object or node by identifying the renderer component for the object or node and determining if the renderer component contains a valid string method that may be used to extract the string representation from the object or node. If so, the valid string method is called to obtain the string representation which is then compared against the input string portion. If the renderer component is a null object, then a default method of converting the hierarchical structure object or node into a textual representation is used to generate the string for the comparison, e.g., the toString() method may be utilized.

[0019] If the renderer component does not include a valid string method and the renderer component is not null, then a determination is made as to whether or not the renderer component is a container. If not, again the default method of converting the object or node to a string is utilized. If the renderer component is a container, the renderer component is search for an object that derives from a label or text component object. This indicates that the object is used to represent text on a display and is likely to have methods for obtaining the textual representation. The identified object is then used to determine if a valid string method exists, and if so, the valid string method is used to obtain the textual representation for the hierarchical structure object or node.

[0020] These and other features and advantages of the present invention will be described in, or will become apparent to those of ordinary skill in the art in view of, the following detailed description of the preferred embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:

[0022]FIG. 1 is a pictorial diagram of a data processing system in which the present invention may be implemented;

[0023]FIG. 2 is an exemplary block diagram of a data processing system in which the present invention may be implemented;

[0024]FIG. 3 is an exemplary diagram illustrating a tree structure in accordance with the present invention;

[0025]FIG. 4 is a flowchart outlining an exemplary operation of the present invention; and

[0026] FIGS. 5A-5C illustrate exemplary code for implementing the functions shown in the flowchart of FIG. 4.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0027] The present invention provides an apparatus and method for generating string representations of objects in a hierarchical structure, such as a tree or list structure. The present invention may be implemented in any known or later developed computing system. FIGS. 1 and 2 are provided as an exemplary computing system in which the present invention may be implemented. However, FIGS. 1 and 2 are not intended to imply any limitation as to the computing systems on which the present invention may be implemented.

[0028] With reference now to the figures and in particular with reference to FIG. 1, a pictorial representation of a data processing system in which the present invention may be implemented is depicted in accordance with a preferred embodiment of the present invention. A computer 100 is depicted which includes system unit 102, video display terminal 104, keyboard 106, storage devices 108, which may include floppy drives and other types of permanent and removable storage media, and mouse 110. Additional input devices may be included with personal computer 100, such as, for example, a joystick, touchpad, touch screen, trackball, microphone, and the like. Computer 100 can be implemented using any suitable computer, such as an IBM eServer computer or IntelliStation computer, which are products of International Business Machines Corporation, located in Armonk, N.Y.

[0029] Although the depicted representation shows a computer, other embodiments of the present invention may be implemented in other types of data processing systems, such as a network computer. Computer 100 also preferably includes a graphical user interface (GUI) that may be implemented by means of systems software residing in computer readable media in operation within computer 100.

[0030] With reference now to FIG. 2, a block diagram of a data processing system is shown in which the present invention may be implemented. Data processing system 200 is an example of a computer, such as computer 100 in FIG. 1, in which code or instructions implementing the processes of the present invention may be located. Data processing system 200 employs a peripheral component interconnect (PCI) local bus architecture. Although the depicted example employs a PCI bus, other bus architectures such as Accelerated Graphics Port (AGP) and Industry Standard Architecture (ISA) may be used.

[0031] Processor 202 and main memory 204 are connected to PCI local bus 206 through PCI bridge 208. PCI bridge 208 also may include an integrated memory controller and cache memory for processor 202. Additional connections to PCI local bus 206 may be made through direct component interconnection or through add-in boards.

[0032] In the depicted example, local area network (LAN) adapter 210, small computer system interface SCSI host bus adapter 212, and expansion bus interface 214 are connected to PCI local bus 206 by direct component connection. In contrast, audio adapter 216, graphics adapter 218, and audio/video adapter 219 are connected to PCI local bus 206 by add-in boards inserted into expansion slots. Expansion bus interface 214 provides a connection for a keyboard and mouse adapter 220, modem 222, and additional memory 224. SCSI host bus adapter 212 provides a connection for hard disk drive 226, tape drive 228, and CD-ROM drive 230. Typical PCI local bus implementations will support three or four PCI expansion slots or add-in connectors.

[0033] An operating system runs on processor 202 and is used to coordinate and provide control of various components within data processing system 200 in FIG. 2. The operating system may be a commercially available operating system such as Windows XP, which is available from Microsoft Corporation. An object oriented programming system such as Java may run in conjunction with the operating system and provides calls to the operating system from Java programs or applications executing on data processing system 200. “Java” is a trademark of Sun Microsystems, Inc. Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such as hard disk drive 226, and may be loaded into main memory 204 for execution by processor 202.

[0034] Those of ordinary skill in the art will appreciate that the hardware in FIG. 2 may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash read-only memory (ROM), equivalent nonvolatile memory, or optical disk drives and the like, may be used in addition to or in place of the hardware depicted in FIG. 2. Also, the processes of the present invention may be applied to a multiprocessor data processing system.

[0035] For example, data processing system 200, if optionally configured as a network computer, may not include SCSI host bus adapter 212, hard disk drive 226, tape drive 228, and CD-ROM 230. In that case, the computer, to be properly called a client computer, includes some type of network communication interface, such as LAN adapter 210, modem 222, or the like. As another example, data processing system 200 may be a stand-alone system configured to be bootable without relying on some type of network communication interface, whether or not data processing system 200 comprises some type of network communication interface. As a further example, data processing system 200 may be a personal digital assistant (PDA), which is configured with ROM and/or flash ROM to provide non-volatile memory for storing operating system files and/or user-generated data.

[0036] The depicted example in FIG. 2 and above-described examples are not meant to imply architectural limitations. For example, data processing system 200 also may be a notebook computer or hand held computer in addition to taking the form of a PDA. Data processing system 200 also may be a kiosk or a Web appliance. The processes of the present invention are performed by processor 202 using computer implemented instructions, which may be located in a memory such as, for example, main memory 204, memory 224, or in one or more peripheral devices 226-230.

[0037] The present invention provides a method and apparatus for obtaining a textual representation of an object in a hierarchical structure, such as a tree or list. As set forth hereafter, the preferred embodiments of the present invention are described in terms of a Java implementation, however the present invention is not limited to such. Rather, the present invention may be implemented in any object-oriented environment in which hierarchical structures of objects are displayed using graphical user interfaces (GUIs). The preferred embodiments will be described in terms of a tree hierarchical structure, however the present invention may be applied to any hierarchical structure including lists of objects, and the like.

[0038] The class JTree in Java, is a control that displays a set of hierarchical data as an outline. A specific node, i.e. an object that may be a file, a folder, a portion of data, etc., in the tree can be identified by a TreePath (an object that encapsulates a node and all of its ancestors), or by its display row, where each row in the display area displays one node. An expanded node is a node that displays its children. A collapsed node is a node that hides its children. A hidden node is a node that is under a collapsed ancestor node. All of a viewable node's parent nodes are expanded, but may or may not be displayed. A displayed node is both viewable and is in the display area where it can be seen by a user.

[0039] When a tree structure is rendered in the Java environment, for every node in the JTree, a tree cell renderer is called to render the display of that node in the displayed JTree. The tree cell renderer may be a custom tree cell renderer or may be a default one. When the tree is rendered, the tree cell renderer for each node is asked to return a JComponent that the tree will use to paint the tree cell.

[0040] With the present invention, a request is sent to the JTree requesting the JComponent that the JTree uses to paint a selected object on the screen. Since this JTree component is used to paint the object, the JTree component typically includes methods for obtaining text that is painted on the screen to represent the object.

[0041] Once the JComponent is identified by requesting it from the JTree, reflection is performed on the JComponent to request its string representation. Reflection is an Application Program Interface in Java that allows an executing Java program to examine or “introspect” upon itself, and manipulate internal properties of the program. For example, it is possible for a Java class to obtain the names of all its members and display them.

[0042] Since most JComponents include the method calls getText() and getLabel(), the use of reflection on the Jcomponent has a high likelihood of returning a string representation that resembles the actual object displayed in the JTree. Through the use of reflection, essentially the getText() and/or getLabel() methods are called to obtain the textual representation of the object that is painted by the Jcomponent.

[0043] In particular, with the apparatus and method of the present invention, a textual list having separators, such as “|_” or “/”, may be converted into a path equivalent, such as a TreePath, for a specified hierarchical structure, such as a JTree. The TreePath may then be used to reference objects in a display of the JTree. The TreePath may also be used to render the objects in the JTree.

[0044] In order to convert a separated list, e.g., Root|_Subnode1|_Subnode2|_Subnode3, into a textual representation for a corresponding object in a JTree, it is first necessary to match the separated list to an object in the JTree. To do this, an input string having separators is received and the cell renderer for JTree is identified. The first string portion of the input string (portions being delimited by the separators), is identified and a search of the JTree is performed to find an object in the JTree matching the first string portion.

[0045] The search of the JTree involves taking an object, or node, at a row, i.e. level of the JTree, obtaining a text representation for the object, and comparing the text representation for the object to the input string portion. If there is not a match, the next object, or node, in the JTree is checked and so on until the end of the JTree is encountered. If the end of the JTree is encountered and there are still portions of the input string for which a matching node in the JTree is not found, then the present invention terminates with a failure indication.

[0046] If the text representation for the object matches the input string portion, the next input string portion is checked against a text representation for the next node in the JTree. This process continues until either the end of the JTree is encountered or there are no more input string portions to process. If there are no more input string portions to process, then the JTree path identified by the matching is output.

[0047] The present invention obtains the textual representation for a JTree object or node by identifying the tree cell renderer component for the object or node and determining if the tree cell renderer component contains a valid string method, such as getText() or getLabel(), that may be used to extract the string representation from the object or node. If so, the valid string method is called, e.g., through reflection, to obtain the string representation which is then compared against the input string portion. If the tree cell renderer component is a null object, then a default method of converting the JTree object or node into a textual representation is used to generate the string for the comparison, e.g., the toString() method may be utilized.

[0048] If the tree cell renderer component does not include a valid string method and the tree cell renderer component is not null, then a determination is made as to whether or not the tree cell render component is a container. If not, again the default method of converting the object or node to a string is utilized. If the tree cell renderer component is a container, the tree cell renderer component is search for an object that derives from a label or text component object, such as JLabel or JTextComponent. This indicates that the object is used to represent text on a display and is likely to have methods for obtaining the textual representation. The identified text component object is then used to determine if a valid string method exists, e.g., if the text component object includes a valid string method. If so, the valid string method is used to obtain the textual representation for the hierarchical structure object or node.

[0049] Thus, using the mechanism described above, the present invention is able to obtain a string representation of an object in a hierarchical structure that resembles the display of the object. For example, the string representation may take the form:

[0050] Node|_subNode1|_subNode2

[0051] which is similar and resembles the way that the tree levels would be displayed to the user. In this way, a user may specify a tree node to select/expand using this type of format in a test script so that it can later be compared to the JTree's internal representation to determine exactly which node is being referenced by the user.

[0052]FIG. 3 is an exemplary diagram illustrating a tree structure in accordance with the present invention. As an example of how the present invention may be used with the tree structure of FIG. 3, assume that an input string has the following separated list format:

[0053] Root|_Subnode1|_Subnode2|_Subnode3

[0054] With the present invention, the tree cell renderer for the JTree shown in FIG. 3 is obtained. And the Root Object is identified from the JTree. The method getTreeCellRendererComponent() is called on the TreeCellRender to identify the JComponent used to render the Root Object. A determination is then made as to whether this JComponent has a valid string method for obtaining a string representation for the Root Object.

[0055] Assume that the JComponent includes the method getText() . As a result, the method getText() in the JComponent is called, through reflection, on the Root Object to obtain the textual representation “Root.” This textual representation “Root” is then compared to the first string portion of the input string. The result is a match. Since there is a match, the next portion of the input string is identified and the next node in the JTree below the Root Object is identified, i.e. the node corresponding to Object 1 in row 2 of the JTree.

[0056] The same process is performed on Object 1 and the textual representation “Subnodel” is obtained from the getText() or getLabel() method of the JComponent for Object 1. Again the comparison is performed and a match is identified.

[0057] This same process is repeated for rows 3 and 4 of the JTree. Each time, a match is identified. Once there are no longer any more portions of the input string to be processed, the resulting TreePath object is output for use in later identifying the object represented by the input string. Such information may then be stored in a data structure for future reference, for example, in generating test scripts or otherwise referencing the object using the input string.

[0058]FIG. 4 is a flowchart outlining an exemplary operation of the present invention. As shown in FIG. 4, upon input of a string having a separated list format, the operation of the present invention starts with obtaining a tree cell renderer for the JTree (step 404). Then the getTreeCellRendererComponent() method of the Tree Cell Renderer is called on the next node in the tree (step 408).

[0059] A determination is made as to whether the JComponent obtained from the call of the getTreeCellRenderer Component() includes a valid string method (step 410). If so, the valid string method is used to obtain a string representation for the node of the tree (step 412). If a valid string method is not part of the JComponent, a determination is made as to whether the JComponent is a container (step 422). If so, a search within the JComponent for an object that derives from JLabel or JTextComponent is performed (step 426) and this identified Object is used as a basis for obtaining the string representation (return to step 410). If the Jcomponent is not a container, or if the Jcomponent is a null object, a default method is used to obtain the string representation for the node (step 424).

[0060] Once a string representation is obtained for the node in the JTree, a determination is made as to whether the string representation matches the current portion of the input string (step 414). If not, the operation goes to the next node in the JTree (step 415) and returns to step 408. If there is a match, a determination is made as to whether this is the last node in the tree (step 416). If so, the operation terminates with a failure (step 417).

[0061] If this is not the last node in the tree, a determination is made as to whether this is the last node in the input string (step 418). If so, the tree path obtained from the matching operation is output (step 419). If this is not the last node in the string or this is not the last node in the tree, the operation advances to the next node in the string and/or tree (step 420) and the operation returns to step 408.

[0062] FIGS. 5A-5C illustrate exemplary code for implementing the functions described in the flowchart of FIG. 4. The code shown in FIGS. 5A-5C is only exemplary and many modifications may be made to this exemplary code without departing from the spirit and scope of the present invention.

[0063] Thus, the present invention provides a mechanism that allows a textual representation of an object in a hierarchical structure to be generated that resembles the visual depiction of the object. As a result, the present invention provides a more user friendly and user recognizable string representation for an object in a hierarchical structure.

[0064] It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMs, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.

[0065] The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments described above were chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated. 

What is claimed is:
 1. A method for obtaining a string representation of a graphical user interface object, comprising: associating a first graphical user interface (GUI) object, from a set of GUI objects arranged in a hierarchical structure, with a respective first rendering process used to render the first GUI object on a display; requesting a first component object from the first rendering process; and calling a method in the first component object to obtain the string representation.
 2. The method of claim 1, further comprising: receiving an input string having a plurality of portions separated by a separator; identifying a current portion of the input string; and comparing the string representation to the current portion of the input string.
 3. The method of claim 2, further comprising: adding the object to a path object for the input string if the string representation matches the current portion of the input string.
 4. The method of claim 3, further comprising: determining if the current portion of the input string is a last portion of the input string; and outputting the path object if the current portion of the input string is a last portion of the input string.
 5. The method of claim 2, further comprising: determining if the string representation matches the current portion of the input string, wherein if the string representation matches the current portion of the input string, the method further comprises: identifying a next GUI object in the set of GUI objects if the string representation matches the current portion of the input string; identifying a next portion of the input string as the current portion of the input string; associating the next GUI object with a respective second rendering process used to render the next GUI object on a display; requesting a second component object from the second rendering process; calling a method in the second component object to obtain a second string representation; comparing the second string representation to the current portion of the input string; and determining if the second string representation matches the current portion of the input string.
 6. The method of claim 1, wherein the hierarchical structure is a JTree.
 7. The method of claim 1, wherein the first component object is a JComponent and wherein the method is one of getText() and getLabel().
 8. The method of claim 1, wherein calling a method in the first component object to obtain the string representation includes: determining if the first component object includes a method for obtaining a string representation of the GUI object; and determining if the first component object is a container object if the first component object does not include a method for obtaining the string representation of the GUI object.
 9. The method of claim 8, further comprising: searching the first component object for an alternative object derived from an object used to render text if the first component object is a container object; and using the alternative object to generate the string representation.
 10. The method of claim 8, further comprising: using a default method of converting a GUI object to a string representation if the first component does not include a method for obtaining a string representation of the GUI object and the first component object is not a container object.
 11. A computer program product in a computer readable medium for obtaining a string representation of a graphical user interface object, comprising: first instructions for associating a first graphical user interface (GUI) object, from a set of GUI objects arranged in a hierarchical structure, with a respective first rendering process used to render the first GUI object on a display; second instructions for requesting a first component object from the first rendering process; and third instructions for calling a method in the first component object to obtain the string representation.
 12. The computer program product of claim 11, further comprising: fourth instructions for receiving an input string having a plurality of portions separated by a separator; fifth instructions for identifying a current portion of the input string; and sixth instructions for comparing the string representation to the current portion of the input string.
 13. The computer program product of claim 12, further comprising: seventh instructions for adding the object to a path object for the input string if the string representation matches the current portion of the input string.
 14. The computer program product of claim 13, further comprising: eighth instructions for determining if the current portion of the input string is a last portion of the input string; and ninth instructions for outputting the path object if the current portion of the input string is a last portion of the input string.
 15. The computer program product of claim 12, further comprising: seventh instructions for determining if the string representation matches the current portion of the input string, wherein if the string representation matches the current portion of the input string, the computer program product further comprises: instructions for identifying a next GUI object in the set of GUI objects if the string representation matches the current portion of the input string; instructions for identifying a next portion of the input string as the current portion of the input string; instructions for associating the next GUI object with a respective second rendering process used to render the next GUI object on a display; instructions for requesting a second component object from the second rendering process; instructions for calling a method in the second component object to obtain a second string representation; instructions for comparing the second string representation to the current portion of the input string; and instructions for determining if the second string representation matches the current portion of the input string.
 16. The computer program product of claim 11, wherein the hierarchical structure is a JTree.
 17. The computer program product of claim 11, wherein the first component object is a Jcomponent and wherein the method is one of getText() and getLabel().
 18. The computer program product of claim 11, wherein the third instructions for calling a method in the first component object to obtain the string representation include: instructions for determining if the first component object includes a method for obtaining a string representation of the GUI object; and instructions for determining if the first component object is a container object if the first component object does not include a method for obtaining the string representation of the GUI object.
 19. The computer program product of claim 18, further comprising: instructions for searching the first component object for an alternative object derived from an object used to render text if the first component object is a container object; and instructions for using the alternative object to generate the string representation.
 20. The computer program product of claim 18, further comprising: instructions for using a default method of converting a GUI object to a string representation if the first component does not include a method for obtaining a string representation of the GUI object and the first component object is not a container object.
 21. An apparatus for obtaining a string representation of a graphical user interface object, comprising: means for associating a first graphical user interface (GUI) object, from a set of GUI objects arranged in a hierarchical structure, with a respective first rendering process used to render the first GUI object on a display; means for requesting a first component object from the first rendering process; and means for calling a method in the first component object to obtain the string representation.
 22. The apparatus of claim 21, further comprising: means for receiving an input string having a plurality of portions separated by a separator; means for identifying a current portion of the input string; and means for comparing the string representation to the current portion of the input string.
 23. The apparatus of claim 22, further comprising: means for adding the object to a path object for the input string if the string representation matches the current portion of the input string.
 24. The apparatus of claim 23, further comprising: means for determining if the current portion of the input string is a last portion of the input string; and means for outputting the path object if the current portion of the input string is a last portion of the input string.
 25. The apparatus of claim 22, further comprising: means for determining if the string representation matches the current portion of the input string, wherein if the string representation matches the current portion of the input string, the apparatus further comprises: means for identifying a next GUI object in the set of GUI objects if the string representation matches the current portion of the input string; means for identifying a next portion of the input string as the current portion of the input string; means for associating the next GUI object with a respective second rendering process used to render the next GUI object on a display; means for requesting a second component object from the second rendering process; means for calling a method in the second component object to obtain a second string representation; means for comparing the second string representation to the current portion of the input string; and means for determining if the second string representation matches the current portion of the input string.
 26. The apparatus of claim 21, wherein the hierarchical structure is a JTree.
 27. The apparatus of claim 21, wherein the first component object is a JComponent and wherein the method is one of getText() and getLabel().
 28. The apparatus of claim 21, wherein the means for calling a method in the first component object to obtain the string representation includes: means for determining if the first component object includes a method for obtaining a string representation of the GUI object; and means for determining if the first component object is a container object if the first component object does not include a method for obtaining the string representation of the GUI object.
 29. The apparatus of claim 28, further comprising: means for searching the first component object for an alternative object derived from an object used to render text if the first component object is a container object; and means for using the alternative object to generate the string representation.
 30. The apparatus of claim 28, further comprising: means for using a default method of converting a GUI object to a string representation if the first component does not include a method for obtaining a string representation of the GUI object and the first component object is not a container object. 